<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('admin.index');
});
//注册模板路由
Route::get('/regist','Admin\User\Regist@index')->name('regist');
//注册信息提交路由
Route::post('/regist','Admin\User\Regist@register')->name('regist');
//登录模板路由
Route::get('/login','Admin\User\Login@index')->name('login');
//登录信息提交路由
Route::post('/login','Admin\User\Login@logins')->name('login');
//注销登录
Route::get('/loginout','Admin\User\Login@out')->name('loginout');
//修改密码模板路由
Route::get('/revise','Admin\User\Revise@index')->name('revise');
//修改密码提交路由
Route::post('/revise','Admin\User\Revise@revises')->name('revise');
//用户管理资源路由
Route::resource('/user','Admin\User\UserName');
//激活账号路由
Route::get('/activate/{token}','Admin\User\Regist@activate')->name('activate');
//输入邮箱路由地址
Route::get('/reset','Admin\Mail\ActivatePassword@resetpossword')->name('reset');
//填写完的post提交路由
Route::post('/resetmail','Admin\Mail\ActivatePassword@resetemail')->name('resetmail');
//忘记密码修改密码的路由
Route::get('/resetepassword/{email}/{email_token}','Admin\Mail\ActivatePassword@changepassword')->name('resetepassword');
//操作修改密码的路由
Route::post('/change','Admin\Mail\ActivatePassword@change')->name('change');
//文章资源路由
Route::resource('/blog','Admin\Blog\BlogController');